package product.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import product.domain.Brand;
import product.domain.CategoryBrandRelation;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * @author panghu
 * @description 针对表【pms_category_brand_relation(品牌分类关联)】的数据库操作Service
 * @createDate 2023-03-04 21:03:08
 */
public interface CategoryBrandRelationService extends IService<CategoryBrandRelation> {

    /**
     * 根据品牌id获取品牌分类关联数据
     *
     * @param brandId
     * @return
     */
    List<CategoryBrandRelation> getListByBrandId(Long brandId);

    void saveDetail(CategoryBrandRelation categoryBrandRelation);

    /**
     * 根据分类id查找此分类下的品牌
     * @param catId
     * @return
     */
    List<Brand> getBrandsByCatId(Long catId);

    List<Brand> getBrandsByWrapper(LambdaQueryWrapper<CategoryBrandRelation> brandWrapper);
}
